<?php
    header('Content-Type: text/html; charset=UTF-8');
    include_once '../config.php';

    if ($_COOKIE['LOG'] == false) {
        header('Location: ../index.php');
    }

    include '../layout/header.php';
?>
<body>
    <div data-role="page">
        <div data-role="header" data-theme="b" class="ui-overlay-shadow">
            <h1>Bearbeiten</h1>
            <a href="javascript:history.back()" data-role="button" data-icon="back" class="ui-btn-left" data-theme="a">Menü</a>
<!--            <a href="add_client.php" data-role="button" data-icon="add" class="ui-btn-right" data-theme="a">Add</a>-->
        </div>
        <div data-role="content" data-theme="c">
            <?php
                if ($_GET['form'] == 'cl') {
                    include_once 'form/client_edit.php';
                } else if ($_GET['form'] == 'pm') {
                    include_once 'form/pmanager_edit.php';
                } else {
                    include_once 'form/buyer_edit.php';
                }
            ?>
        </div>
        <div data-role="footer" data-theme="c">
            <h4>Eingeloggt als: <strong><?php echo $_COOKIE['VNAME'] . ' ' . $_COOKIE['NNAME']; ?></strong></h4>
        </div>
    </div>
</body>
</html>